package com.zhan.utils.log.config;

import com.zhan.utils.log.service.LogService;
import com.zhan.utils.log.service.impl.LogServiceImpl;
import org.redisson.api.RedissonClient;
import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
@ConditionalOnClass(value = RedissonClient.class)
public class LogConfig {

    @Bean
    public LogService logService(RedissonClient redissonClient) {
        LogService logService = new LogServiceImpl();
        logService.setRedissonClient(redissonClient);
        return logService;
    }

}
